package com.yanqu.road.logic.bussiness.union.cross;

import com.yanqu.road.entity.union.cross.*;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class CrossUnionBussiness {

	public static long getMaxUnionAliasId() {
		return DaoHelper.getCrossUnionInfoDaoImpl().getMaxUnionAliasId();
	}

	public static void getUnionInfoMap(Map<String, CrossUnionInfo> unionInfoMap, Map<String, CrossUnionInfo> deleteUnionInfoMap) {
		DaoHelper.getCrossUnionInfoDaoImpl().getUnionInfoMap(unionInfoMap, deleteUnionInfoMap);
	}

	public static List<CrossUnionInfo> getUnionInfoList(int maxCount) {
		return DaoHelper.getCrossUnionInfoDaoImpl().getUnionInfoList(maxCount);
	}

	public static boolean addUnionInfo(CrossUnionInfo unionInfo) {
		return DaoHelper.getCrossUnionInfoDaoImpl().add(unionInfo);
	}

	public static boolean updateUnionInfo(CrossUnionInfo unionInfo) {
		return DaoHelper.getCrossUnionInfoDaoImpl().update(unionInfo);
	}

	public static Map<Long, CrossUnionMember> getUnionMemberMap(Map<String, Map<Long, CrossUnionMember>> unionMemberMap, Map<Long, CrossUnionMember> deleteCrossUnionMemberMap){
		return DaoHelper.getCrossUnionMemberDaoImpl().getUnionMemberMap(unionMemberMap, deleteCrossUnionMemberMap);
	}

	public static boolean addUnionMember(CrossUnionMember unionMember) {
		return DaoHelper.getCrossUnionMemberDaoImpl().add(unionMember);
	}

	public static boolean updateUnionMember(CrossUnionMember unionMember) {
		return DaoHelper.getCrossUnionMemberDaoImpl().update(unionMember);
	}

	public static Map<String, LinkedList<CrossUnionNotice>> getUnionNoticeMap(long selectTime, int maxCount){
		return DaoHelper.getCrossUnionNoticeDaoImpl().getUnionNoticeMap(selectTime, maxCount);
	}

	public static boolean addUnionNotice(CrossUnionNotice unionNotice) {
		return DaoHelper.getCrossUnionNoticeDaoImpl().add(unionNotice);
	}

	public static boolean addUnionFlag(CrossUnionFlag flag) {
		return DaoHelper.getCrossUnionFlagDaoImpl().add(flag);
	}

	public static boolean updateUnionFlag(CrossUnionFlag flag) {
		return DaoHelper.getCrossUnionFlagDaoImpl().update(flag);
	}

	public static Map<String, Map<Integer, CrossUnionFlag>> getAllUnionFlag() {
		return DaoHelper.getCrossUnionFlagDaoImpl().getUnionFlag();
	}

	public static Map<Long, CrossUnionChamberPatrons> getCrossChamberPatrons() {
		return DaoHelper.getCrossChamberPatronsDaoImpl().getCrossChamberPatrons();
	}

	public static boolean addCrossUnionChamberPatrons(CrossUnionChamberPatrons chamberPatrons) {
		return DaoHelper.getCrossUnionChamberPatronsDaoImpl().add(chamberPatrons);
	}

	public static boolean updateCrossUnionChamberPatrons(CrossUnionChamberPatrons chamberPatrons) {
		return DaoHelper.getCrossUnionChamberPatronsDaoImpl().update(chamberPatrons);
	}

	public static Map<Long, CrossUnionReward> getCrossUnionReward() {
		return DaoHelper.getCrossUnionRewardDaoImpl().getShangBangReward();
	}

	public static long getMaxRewardRecordId() {
		return DaoHelper.getCrossUnionRewardDaoImpl().getMaxRecordId();
	}

	public static boolean addCrossUnionReward(CrossUnionReward unionReward) {
		return DaoHelper.getCrossUnionRewardDaoImpl().add(unionReward);
	}

	public static boolean updateCrossUnionReward(CrossUnionReward unionReward) {
		return DaoHelper.getCrossUnionRewardDaoImpl().update(unionReward);
	}
}
